/*
 * @(#)PidFeedService.java
 * Date 2013-10-04
 * Version 1.0
 * Author Jim Horner
 * Copyright (c)2012
 */


package us.hornerscorners.lamppost.registry.service.hl7;

import javax.enterprise.context.ApplicationScoped;

import javax.inject.Inject;

import ca.uhn.hl7v2.hoh.api.IMessageHandler;
import ca.uhn.hl7v2.hoh.api.IReceivable;
import ca.uhn.hl7v2.hoh.api.IResponseSendable;
import ca.uhn.hl7v2.hoh.api.MessageProcessingException;

import ca.uhn.hl7v2.hoh.raw.api.RawSendable;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import us.hornerscorners.lamppost.registry.service.es.PatientIdentityService;


/**
 * Class description
 *
 *
 * @version        v1.0, 2013-10-04
 * @author         Jim Horner
 */
@ApplicationScoped
public class PidFeedService implements IMessageHandler<String> {

    /** Field description */
    private final Logger logger = LoggerFactory.getLogger(getClass());

    /** Field description */
    @Inject
    private PatientIdentityService patientIdentityService;

    /**
     * Constructs ...
     *
     */
    public PidFeedService() {
        super();
    }

    /**
     * Method description
     *
     *
     *
     * @return
     *
     * @throws MessageProcessingException
     */
    @Override
    public IResponseSendable<String> messageReceived(IReceivable<String> receivable)
            throws MessageProcessingException {

        logger.debug("Message {}", receivable.getMessage());

        return new RawSendable("MSH|.......");
    }
}
